﻿using StoCombatLogHUD.Parsing;

namespace StoCombatLogHUD.Statistics.StatisticsEntries
{
	/// <summary>
	/// A static statistics entry.
	/// </summary>
	public class StaticStatisticsEntry : IStatisticsEntry
	{
		/// <summary>
		/// Gets the total value.
		/// </summary>
		/// <value>
		/// The total value.
		/// </value>
		public double TotalValue { get; set; }

		/// <summary>
		/// Gets the value per second.
		/// </summary>
		/// <value>
		/// The value per second.
		/// </value>
		public double ValuePerSecond { get; set; }

		/// <summary>
		/// Gets the <see cref="StatisticValue"/> with the specified flags.
		/// </summary>
		/// <value>
		/// The <see cref="StatisticValue"/>.
		/// </value>
		/// <param name="flags">The flags.</param>
		/// <returns></returns>
		public StatisticValue this[CombatLogEntry.CombatFlags flags]
		{
			get { return new StatisticValue {TotalValue = TotalValue, ValuePerSecond = ValuePerSecond}; }
		}

		/// <summary>
		/// Returns the number of entries matching the given <paramref name="flags" />.
		/// </summary>
		/// <param name="flags">The flags.</param>
		/// <returns></returns>
		public int Count(CombatLogEntry.CombatFlags flags)
		{
			return 1;
		}
	}
}
